/*	The GAE SWF Project: 	Knowledge and tools to help you build Flash and Flex apps on Google App Engine.		Copyright (c) 2008 Aral Balkan. All Rights Reserved.	Released under the open source MIT License. See LICENSE.txt for full license terms.	ServiceCall class	=================	Tightly-coupled with the Service class. Each ServiceCall instance proxies its 	results back to the Service class which notifies listeners on the View and 	Model. 		You should not have to create ServiceCall instances manually.*/package org.gaeswf{	import flash.net.Responder;
	
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;		public class ServiceCallRO	{		private var responder:Responder;		private var serviceName:String = null;				public function ServiceCallRO(serviceName:String, args:Array)		{			this.serviceName = serviceName;										ServiceRO.ro.source = serviceName.split(".")[0];			ServiceRO.ro.addEventListener(FaultEvent.FAULT, faultHandler);			ServiceRO.ro.addEventListener(ResultEvent.RESULT, responseHandler);			ServiceRO.ro[serviceName.split(".")[1]].send.apply(null,args);				}				private function responseHandler(result:Object):void		{			ServiceRO.responseHandler(serviceName, result);		}				private function faultHandler(fault:Object):void		{			ServiceRO.faultHandler(serviceName, fault);		}			}}